<?php 
/**
 * 
 * 打工 处理类
 * @author tanzhe
 *
 */
class work {
	
	public function get() { //获得工作信息
		$url = new Url();
		$workPlace = $url->get('workplace');
	  	$key = $url->get('key');
		$workModel = new WorkModel(); 
		$ret = $workModel->getJob($key, $workPlace);
		
		$callback = $url->get('jsonpcallback');
		Json::do_jsonp_encode($callback,$ret);
	}
	
	public function doJob() { //打工
		$url = new Url();
		
	  	$key = $url->get('key');
		$label = $url->get('label');
		$workModel = new WorkModel(); 
		$ret = $workModel->doJob($key, $label);
		
		$callback = $url->get('jsonpcallback');
		Json::do_jsonp_encode($callback,$ret);
	}
}
?>